#-*- codeing = utf-8 -*-
#@Time : 2020/8/7 14:09
#@Author : 阳某
#@File : testjson.py
#@Software : PyCharm

import json
str = '{"name":"盗梦空间"}'
print(type(str))
print(str)
obj = json.loads(str)
print(type(obj))
print(obj)
print('*'*10)
str2 = json.dumps(obj,ensure_ascii=False)
print(type(str2))
print(str2)

json.dump(obj,open('movie.txt','w',encoding='utf-8'),ensure_ascii=False)

print('--`'*10)
str3 = json.load(open('movie.txt',encoding='utf-8'))
print(str3)